class Student(object):
    count = 0

    def __init__(self, name):
        self.name = name
        self.set_count()

    def set_count(self):
        Student.count += 1

xiaohong = Student('xiaohong')
q = Student('xiaobai')
print(Student.count)